<style>
	#PredracunContainer{
		width:800px;
		font-family:"Arial";
		font-size:9pt;
		text-align:center;
		background-color:#fff;
		float:left;
	}	
	#PredracunContainer h1{
		font-size:14pt;
		text-align:center;
		margin:1mm auto;
		padding:0mm;
	}
	#PredracunContainer h3{
		margin:1mm auto;
		padding:0mm;
		font-size:11pt;
		font-weight:normal;
		text-align:center;
	}
	#PredracunContainer hr{
		width:90%;
		margin:2mm auto;
	}
	#PredracunContainer hr.divide{
		clear:both;
		margin:1mm 0mm;
		width:100%;
		height:0.1mm;
		background:#fff;
		border:none;
		border-bottom:0.3mm dotted #555;
	}
	#PredracunContainer table{
		border:0.3mm solid #000;
		width:100%;
		font-size:8pt;
	}
	#PredracunContainer table tr.head{
		background:#eee;
		font-weight:bold;
	}
	#PredracunContainer table tr.sum{
		font-weight:bold;
		background:#ddd;
	}
	#PredracunContainer table tr[ondblclick]{
		-moz-user-select:none;
	}
	#PredracunContainer table tr td{
		padding:1mm;
		border-right:0.3mm solid #000;
		border-bottom:0.3mm solid #000;
	}
	#PredracunContainer table tr td.edit:hover{
		cursor:pointer;
		background:#ccc;
	}
	#PredracunContainer table tr td:last-child{
		border-right:none;
	}
	#PredracunContainer table tr.sum td{
		border-top:0.5mm solid #000;
		border-right:none;
		border-bottom:0.4mm solid #000;
		border-left:none;
	}
	#PredracunContainer table tr.sum td:first-child{border-left:1mm solid #000;}
	#PredracunContainer table tr.sum td:last-child{border-right:0.5mm solid #000;}
	
	#PredracunContainer .border{
		border:0.3mm solid #000;
		-moz-border-radius:3mm;
		padding:1mm 2mm;
		margin:3mm auto;
	}
	#PredracunContainer .border h1{
		margin:0mm;
		padding:1mm 2mm;
		font-size:14pt;
	}
	#PredracunContainer .second{
		float:left;
		margin-left:8mm;
	}
	#PredracunContainer .second .label{
		width:37mm;
		font-weight:normal;
	}
	#PredracunContainer .second .value{
		width:20mm;
		text-align:right;
	}
	#PredracunContainer .second1 .value{
		width:15mm;
		text-align:right;
	}
	#PredracunContainer #header{
		border-bottom:0.3mm solid #555;
		padding-bottom:5mm;
		text-align:left;
	}
	#PredracunContainer #header img{
		width:154mm;
		height:23mm;
	}
	#PredracunContainer #predracun_title{
		margin:5mm auto;
		padding:0mm 5mm;
		width:80mm;
		border:0.3mm solid #000;
		-moz-border-radius:3mm;
		text-align:center;
	}
	#PredracunContainer #predracun_title .value{
		float:none;
		display:inline;
		margin-left:5px;
	}
	#PredracunContainer #content{
		margin:0px auto;
		width:90%;
		text-align:left;
	}
	#PredracunContainer #komitent_info{
		border:0.3mm solid #000;
		padding:5mm;
		text-align:left;
		-moz-border-radius:5mm;
		float:right;
	}
	#PredracunContainer .value, #PredracunContainer .label{
		display:block;
		float:left;
		height:4.5mm;
	}
	#PredracunContainer .label{
		width:25mm;
		clear:both;
		text-align:right;
		font-weight:bold;
		margin-right:2mm;
	}
	#PredracunContainer .value{
		min-width:30mm;
	}
	#PredracunContainer .value:hover{
		background:#ccc;
	}
	#PredracunContainer #header{
		clear:both;
	}
	#PredracunContainer #stavkeTable tr.head{
		color:#000;
		text-align:center;
	}
	#PredracunContainer #stavkeTable td.edit{
		padding-left:5px;
		background-image:none;
	}
	#PredracunContainer #stavkeTable .paketinfo{
		font-size:8pt;
	}
	#PredracunContainer #predracuninfotext{
		font-size:9pt;
	}
	#placanje_div span.value{
		float:none;
		display:inline;
	}
	#PredracunContainer .noedit {
		background-color:transparent;
	}
	#PredracunContainer .noedit:hover {
		background-color:transparent;
	}
	#actions_strip {
		height:20px;
		overflow:hidden;
		float:right;
		margin-bottom:-20px;
	}
	#actions_strip input {
		width:30px;
		height:20px;
		border:none;
		padding:0px;
		margin:0px;
		cursor:pointer;
	}
	#actions_strip .saveprint {
		background:url(gui/icons/saveprint.gif) no-repeat center center;
	}
</style>
<div id="actions_strip">
	<input type="button" class="saveprint" onclick="predracunSavePrint('{{$ugoid}}',{{$ugo_id}});" title="Sačuvaj/Odštampaj" />
</div>
<div id="PredracunContainer">
	<div id="header">
	<img src="gui/predracun/header.gif" border="0" /></div>
	<h1 id="predracun_title">Predračun broj:<span style="display:inline; float:none;" class="value" id="broj_ugovora_gore">{{$ugoid}}</span></h1>
	<hr size="3" noshade="noshade" />
	<div id="content">
		<div id="komitent_info">
			<span class="label">Ime firme:</span><span class="value">{{$komitent_ime}}</span>
			<span class="label">Adresa:</span><span class="value">{{$komitent_adresa}}</span>
			<span class="label">Grad:</span><span class="value">{{$komitent_mesto}}</span>
			<span class="label">PIB:</span><span class="value">{{$komitent_pib}}</span>
			<span class="label">Telefon:</span><span class="value">{{$komitent_tel}}</span>
			<span class="label">Fax:</span><span class="value">{{$komitent_fax}}</span>
			<span class="label">E-mail:</span><span class="value">{{$komitent_mail}}</span>
			<span class="label">Račun:</span><span class="value">{{$komitent_zr}}</span>
		</div><br clear="all" />
		<div class="border" style="float:left; width:98%">
			<strong style="float:left; display:block;">Datum:</strong>
			<span id="datumCenovnika" class="value" style="margin-left:2mm;">{{$date}}</span>
			
			<strong style="float:left; display:block;">Valuta plaćanja:</strong>
			<span id="valuta_placanja" class="value" style="margin-left:2mm;">{{$date}}</span>
			
			<strong style="float:left; display:block;">Po ugovoru:</strong>
			<span class="value" style="margin-left:2mm;" id="broj_ugovora_dole">{{$ugoid}}</span>
		</div><br clear="all" />
		<div id="divCenovnik" style="display:none">
			<select id="cenovnik">{{$cenovnik}}</select>
		</div>
		<table ondblclick="predracunDuplicateStavkaRow(rows[rows.length-2],event);" cellspacing="0" id="stavkeTable" porez="{{$porez_perc}}">
			<tr class="head">
				<td>Šifra</td>
				<td>Naziv artikla</td>
				<td>Kol</td>
				<td>Cena</td>
				<td>Kol * Cena</td>
				<td>Popust %</td>
				<td>Popust</td>
				<td>PDV&nbsp;{{$porez_perc}}&nbsp;%</td>
				<td>Ukupno</td>
			</tr>
			{{%loop start count}}
			<tr ondblclick="predracunDuplicateStavkaRow(this,event)">
				<td>&nbsp;</td>
				<td class="edit">{{$artname}}</td>
				<td class="edit" align="center">{{$artkol}}</td>
				<td class="noedit" align="right">{{$artneto_jed}}</td>
				<td class="noedit" align="right">{{$artneto}}</td>
				<td class="edit" align="right">{{$artpopustperc}}</td>
				<td class="edit" align="right">{{$artpopust}}</td>
				<td class="noedit" align="right">{{$artporez}}</td>
				<td class="noedit" align="right">{{$artbruto}}</td>
			</tr>
			{{%loop end}}
			<tr class="sum">
				<td colspan="4">Suma za ugovor:</td>
				<td class="noedit" align="right">{{$sumneto}}</td>
				<td class="noedit" align="right"></td>
				<td class="noedit" align="right">{{$sumpopust}}</td>
				<td class="noedit" align="right">{{$sumporez}}</td>
				<td class="noedit" align="right">{{$sumbruto}}</td>
			</tr>
		</table>
		<div class="second1" style="float:right; margin:5mm;">
			<span class="label">Osnovica PDV</span><span id="OsnovicaPDV" class="noedit value">{{$osnovica_pdv}}</span>
			<span class="label">Iznos PDV&nbsp;{{$porez_perc}}&nbsp;%</span><span id="IznosPDV" class="noedit value">{{$sumporez}}</span>
			<span class="label">UKUPNO</span><span id="Ukupno" class="noedit value">{{$sumbruto}}</span><br clear="all" />
			<hr class="divide" noshade="noshade" />
			<span class="label">Za uplatu</span><span id="zauplatu1" class="noedit value">{{$sumbruto}}</span>
			<!--<span class="label">Za uplatu</span><span class="value">{{$zauplatu}}</span>-->
		</div>
		<br clear="all" />
		<h3>
			Ugovorena vrednost:
			<span id="ugovorena_vrednost" class="value noedit" style="float:none; display:inline;">{{$sumbruto}}</span>
			dinara
		</h3>
		<div id="placanje_div" class="border" style="float:left; text-align:center">
			<h1>Plaćanje</h1>
			<strong>{{$tip_placanja}}</strong>
			<br />
			<span>Avans </span>
			<span id="placanje_avans" class="value">{{$placanje_avans}}</span>
			<br clear="all" />
			<span>+</span>
			<span id="placanje_rate" class="value">{{$placanje_rate}}</span>
			<span> rate</span>
		</div>
		<div id="dug" class="border second">
			<span class="label">Ugovoreni avans:</span><span id="ugovoreni_avans" class="value noedit">{{$avans}}</span><span style="float:left; display:block; margin-left:1mm">dinara</span>
			<span class="label">Ugovorena vrednost rate:</span><span id="ugovorena_rata" class="noedit value">{{$vrrate}}</span><span style="float:left; display:block; margin-left:1mm">dinara</span>
			<br clear="all" /><hr class="divide" noshade="noshade" />
			<span class="label">Uplaćeno do sada:</span><span id="uplacenodosada" class="value">{{$otplaceno}}</span><span style="float:left; display:block; margin-left:1mm">dinara</span>
			<span class="label">Ukupno dugovanje:</span><span id="ukupnodugovanje" class="noedit value">{{$dugovanje}}</span><span style="float:left; display:block; margin-left:1mm">dinara</span>
			<br clear="all" /><hr class="divide" noshade="noshade" />
			<span class="label">Za uplatu:</span><span id="zauplatu2" class="value">{{$zauplatu}}</span><span style="float:left; display:block; margin-left:1mm">dinara</span>
		</div>
		<br clear="all" />
		<div id="predracuninfotext">
			{{$obnova_comment_start}}
			<p>Molimo Vas da nam dostavite MATERIJAL ZA IZRADU OGLASA ako je došlo do IZMENE i/ili ako želite IZMENU 
			podataka u odnosu na prethodno publikovan oglas. U obavezi ste da materijal za izmenu oglasa dostavite 
			najkasnije u roku od 7 dana od dana prijema ovog predračuna. Ukoliko iz bilo kog razloga ne pošaljete na 
			vreme materijal za oglas, štampaće se prethodno štampano idejno rešenje. Komitent se obavezuje da uz oglasnu 
			poruku dostavi i popunjenu  deklaraciju po članu 11. Zakona o oglašavanju. Deklaracija se može preuzeti 
			sa sajta www.yuyellowpages.net ili www.zutestrane.co.yu, ili poručiti iz Yellow Pages-a.</p>
			{{$obnova_comment_end}}
			<p>
				Plaćanje u ugovorenom roku. Za plaćanje posle ugovorenog roka zaračunavamo kamatu. u slučaju spora
				nadležan je sud u Beogradu.
			</p>
			<p>
				KOD UPLATE NAVESTI MODEL:&nbsp;<span id="broj_ugovora_dole_dole" class="value" style="float:none; display:inline">{{$ugoid}}</span><br />
				Ovo nije PDV račun.
			</p>
		</div>
		<br clear="all" />
	</div>
</div>
<script>
	predracunInitSpans();
</script>